﻿
<%@ Page Language="C#" Theme="PAT_Theme" MasterPageFile="~/master/PAT.master" AutoEventWireup="true"  CodeFile="PatHistoric.aspx.cs" Inherits="PatHistoric" Title="PatHistoric List" %>

<asp:Content ID="Content2" ContentPlaceHolderID="subHeaderContent" Runat="Server">Pat Historic List</asp:Content>
<asp:Content ID="Content1" ContentPlaceHolderID="mainContent" Runat="Server">
		<data:GridViewSearchPanel ID="GridViewSearchPanel1" runat="server" GridViewControlID="GridView1" PersistenceMethod="Session" />
		<br />
		<data:EntityGridView ID="GridView1" runat="server"			
				AutoGenerateColumns="False"					
				OnSelectedIndexChanged="GridView1_SelectedIndexChanged"
				DataSourceID="PatHistoricDataSource"
				DataKeyNames="IdHistoric"
				AllowMultiColumnSorting="false"
				DefaultSortColumnName="" 
				DefaultSortDirection="Ascending"	
				ExcelExportFileName="Export_PatHistoric.xls"  		
			>
			<Columns>
				<asp:CommandField ShowSelectButton="True" ShowEditButton="True" />				
				<data:HyperLinkField HeaderText="Entity Name / Attibute Name" DataNavigateUrlFormatString="PatHistoricAttributeByEntityEdit.aspx?EntityName={0}&AttibuteName={1}" DataNavigateUrlFields="EntityName,AttibuteName" DataContainer="EntityNameAttibuteNameSource" DataTextField="AttributeLabel" />

				<asp:BoundField DataField="IdActionType" HeaderText="Id Action Type" SortExpression="[ID_ACTION_TYPE]"  />
				<asp:BoundField DataField="Value" HeaderText="Value" SortExpression="[VALUE]"  />
				<asp:BoundField DataField="ValueOld" HeaderText="Value Old" SortExpression="[VALUE_OLD]"  />
				<asp:BoundField DataField="CreationLogin" HeaderText="Creation Login" SortExpression="[CREATION_LOGIN]"  />
				<asp:BoundField DataField="CreationDate" DataFormatString="{0:d}" HtmlEncode="False" HeaderText="Creation Date" SortExpression="[CREATION_DATE]"  />
			</Columns>
			<EmptyDataTemplate>
				<b>No PatHistoric Found!</b>
			</EmptyDataTemplate>
		</data:EntityGridView>
		<br />
		<asp:Button runat="server" ID="btnPatHistoric" OnClientClick="javascript:location.href='PatHistoricEdit.aspx'; return false;" Text="Agregar Nuevo "></asp:Button>
		<data:PatHistoricDataSource ID="PatHistoricDataSource" runat="server"
			SelectMethod="GetPaged"
			EnablePaging="True"
			EnableSorting="True"
			EnableDeepLoad="True"
			>
			<DeepLoadProperties Method="IncludeChildren" Recursive="False">
	            <Types>
					<data:PatHistoricProperty Name="PatHistoricAttributeByEntity"/> 
				</Types>
			</DeepLoadProperties>
			<Parameters>
				<data:CustomParameter Name="WhereClause" Value="" ConvertEmptyStringToNull="false" />
				<data:CustomParameter Name="OrderByClause" Value="" ConvertEmptyStringToNull="false" />
				<asp:ControlParameter Name="PageIndex" ControlID="GridView1" PropertyName="PageIndex" Type="Int32" />
				<asp:ControlParameter Name="PageSize" ControlID="GridView1" PropertyName="PageSize" Type="Int32" />
				<data:CustomParameter Name="RecordCount" Value="0" Type="Int32" />
			</Parameters>
		</data:PatHistoricDataSource>
	    		
</asp:Content>



